<!DOCTYPE HTML>

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:th="http://www.thymeleaf.org">
<head>
<title>Welcome to Pwnography!</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

<!-- Bootstrap CSS -->
<link rel="stylesheet" type="text/css"
	href="../../css/bootstrap.min.css" th:href="@{/css/bootstrap.min.css}" />
<link rel="stylesheet" type="text/css"
	href="../../css/bootstrap-responsive.min.css"
	th:href="@{/css/bootstrap-responsive.min.css}" />

<!-- This style is needed for top navigation bar. It needs some space. Otherwise it would cover body. -->
<style type="text/css">
body {
	padding-top: 60px;
	padding-bottom: 40px;
}

.sidebar-nav {
	padding: 9px 0;
}
</style>
</head>

<body>
	<!-- TOP MENU -->
	<div th:substituteby="template :: top-menu"></div>
	<!-- /TOP MENU -->


	<!-- MAIN CONTAINER -->
	<div class="container-fluid">
		<div class="row-fluid">
			<div class="page-header">
				<h1>Lista wczytanych plików</h1>
			</div>
		</div>

		<!-- MESSAGE BOXES -->
		<div class="row-fluid" th:include="template :: message-boxes"></div>
		<!-- /MESSAGE BOXES -->

		<div class="row-fluid">
			<table class="table" th:if="${fileList}">
				<thead>
					<tr>
						<th>#</th>
						<th>Nazwa pliku</th>
						<th>Ostatnia modyfikacja</th>
						<th>Liczba rewizji</th>
						<th>Opcje</th>
					</tr>
				</thead>
				<tbody>
					<tr th:each="file : ${fileList}">
						<td th:text="${fileStat.index}">BRAK DANYCH</td>
						<td th:text="${file.fileName}">BRAK DANYCH</td>
						<td th:text="${file.lastChangeDate}">BRAK DANYCH</td>
						<td th:text="${file.revisionNumber}">BRAK DANYCH</td>
						<td><a class="btn btn-success"
							th:href="@{'/files/select/' + ${fileStat.index}}"><i
								class="icon-refresh icon-white"></i> Ustaw jako aktywny</a> <a
							class="btn btn-primary"
							th:href="@{'/files/history/' + ${fileStat.index}}"><i
								class="icon-th-list icon-white"></i> Historia zmian</a> <a
							class="btn btn-success"
							th:href="@{'/files/download/' + ${fileStat.index} + '/revision/' + ${file.currentRevision}}"><i
								class="icon-download-alt icon-white"></i> Pobierz</a> <a
							class="btn btn-danger"
							th:href="@{'/files/delete/' + ${fileStat.index}}"><i
								class="icon-trash icon-white"></i> Usuń</a></td>
					</tr>
				</tbody>
			</table>
		</div>
	</div>
	<!-- /MAIN CONTAINER -->

	<!-- ======================================================== -->
	<!-- Scripts at bottom of page means faster loading times. -->
	<!-- Latest jQuery -->
	<script type="text/javascript"
		src="http://code.jquery.com/jquery-latest.min.js"></script>
	<!-- Bootstrap -->
	<script type="text/javascript" src="../../js/bootstrap.min.js"
		th:src="@{/js/bootstrap.min.js}"></script>
</body>
</html>